<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="edit-card">
    <h1>添加文章</h1>
    <form id="dataForm" method="post" enctype="multipart/form-data">
        <input type="hidden" id="img" name="img">
        <table>
            <tr>
                <td width="30%">标题</td>
                <td class="ta-left">
                    <input type="text" class="wpx300 sm" name="title">
                </td>
            </tr>
            <tr>
                <td>内容</td>
                <td class="ta-left">
                    <%--<textarea name="content" id="content"></textarea>--%>
                    <!-- 加载编辑器的容器 -->
                    <script id="container" name="content" type="text/plain"></script>
                </td>
            </tr>
            <tr>
                <td>图片</td>
                <td class="ta-left">
                    <div>
                        <input type="file" name="image" id="imgFile">
                    </div>
                    <div class="mtpx20">
                        <img class="img hide" id="imgUrl">
                    </div>
                </td>
            </tr>
            <tr>
                <td></td>
                <td class="ta-left">
                    <input type="button" value="提交" id="articleAddSave" class="sm">
                    <input type="button" value="返回" id="back" class="sm">
                </td>
            </tr>
        </table>
    </form>
</div>
<script>
    $("#articleAddSave").on("click", function () {
        ajaxArticleAdd();
    });
    $("#back").on("click", function () {
        articleList();
    });
    $("#imgFile").on("change", function () {
        uploadImg();
    });
</script>